<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="tags" tagdir="/WEB-INF/tags"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"
%><%@ taglib prefix="spring" uri="http://www.springframework.org/tags"
%><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"
%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"
%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%><head>
	<title><fmt:message key="account" /></title>
</head>
<body>
	<table class="show">
		<tbody>
			<tr>
				<th><fmt:message key="account_addressId" /></th>
				<td>
					<c:if test="${account.mainAddress != null}">
						<spring:bind path="account.mainAddress">
							<spring:transform value="${account.mainAddress}" var="mainAddress"/>
						</spring:bind>
						<tags:a href="/domain/address/show/${account.mainAddress.primaryKey}" text="${mainAddress}" cssClass="ajaxLink"/>
					</c:if>
				</td>
			</tr>
			<tr class="odd">
				<th><fmt:message key="account_username" /></th>
				<td>
					<spring:eval expression="account.username"/>
				</td>
			</tr>
			<tr>
				<th><fmt:message key="account_password" /></th>
				<td>
					<spring:eval expression="account.password"/>
				</td>
			</tr>
			<tr class="odd">
				<th><fmt:message key="account_email" /></th>
				<td>
					<spring:eval expression="account.email"/>
				</td>
			</tr>
			<tr>
				<th><fmt:message key="account_isEnabled" /></th>
				<td>
					<spring:eval expression="account.isEnabled"/>
				</td>
			</tr>
			<tr class="odd">
				<th><fmt:message key="account_birthDate" /></th>
				<td>
					<spring:eval expression="account.birthDate"/>
				</td>
			</tr>
			<tr>
				<th><fmt:message key="account_civility" /></th>
				<td>
					<spring:eval expression="account.civility"/>
				</td>
			</tr>
			<tr class="odd">
				<th><fmt:message key="account_firstName" /></th>
				<td>
					<spring:eval expression="account.firstName"/>
				</td>
			</tr>
			<tr>
				<th><fmt:message key="account_lastName" /></th>
				<td>
					<spring:eval expression="account.lastName"/>
				</td>
			</tr>
			<tr class="odd">
				<th><fmt:message key="account_yearsOfExperience" /></th>
				<td>
					<spring:eval expression="account.yearsOfExperience"/>
				</td>
			</tr>
			<tr>
				<th><fmt:message key="role" /></th>
				<td>
					<ul class="inline">
						<c:forEach items="${account.roles}" var="role" varStatus="status">
							<spring:bind path="account.roles[${status.index}]">
								<spring:transform value="${role}" var="roleFormatted"/>
								<li>
									<tags:a href="/domain/role/show/${role.primaryKey}" text="${roleFormatted}" cssClass="ajaxLink"/>
								</li>
							</spring:bind>
						</c:forEach>
					</ul>
				</td>
			</tr>
			<tr class="odd">
				<th><fmt:message key="book" /></th>
				<td>
					<ul class="inline">
						<c:forEach items="${account.favoriteBooks}" var="favoriteBook" varStatus="status">
							<spring:bind path="account.favoriteBooks[${status.index}]">
								<spring:transform value="${favoriteBook}" var="favoriteBookFormatted"/>
								<li>
									<tags:a href="/domain/book/show/${favoriteBook.primaryKey}" text="${favoriteBookFormatted}" cssClass="ajaxLink"/>
								</li>
							</spring:bind>
						</c:forEach>
					</ul>
				</td>
			</tr>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="2">
					<tags:a href="/domain/account/update/${account.primaryKey}" key="crud.edit.button" cssClass="ajaxLink" icon="edit"/>
					<tags:a href="/domain/account/createForm" key="crud.create.button" cssClass="ajaxLink" icon="add"/>
					<tags:a href="/domain/account/delete/${account.primaryKey}" key="crud.delete.button" cssClass="ajaxModal" icon="delete"/>
				</td>
			</tr>
		</tfoot>
	</table>
</body>
